package com.ruoyi.rulengine.service.impl;

import com.ruoyi.rulengine.domain.RuleAction;
import com.ruoyi.rulengine.mapper.RuleActionMapper;
import com.ruoyi.rulengine.service.IRuleActionService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 规则动作Service业务层处理
 *
 * @author changkang
 * @date 2025-05-11
 */
@Service
public class RuleActionServiceImpl implements IRuleActionService {
    @Resource
    private RuleActionMapper ruleActionMapper;

    /**
     * 查询规则动作
     *
     * @param id 规则动作主键
     * @return 规则动作
     */
    @Override
    public RuleAction selectRuleActionById(Long id)
    {
        return ruleActionMapper.selectRuleActionById(id);
    }

    /**
     * 查询规则动作列表
     *
     * @param ruleAction 规则动作
     * @return 规则动作
     */
    @Override
    public List<RuleAction> selectRuleActionList(RuleAction ruleAction)
    {
        return ruleActionMapper.selectRuleActionList(ruleAction);
    }

    /**
     * 新增规则动作
     *
     * @param ruleAction 规则动作
     * @return 结果
     */
    @Override
    public int insertRuleAction(RuleAction ruleAction)
    {
        return ruleActionMapper.insertRuleAction(ruleAction);
    }

    /**
     * 修改规则动作
     *
     * @param ruleAction 规则动作
     * @return 结果
     */
    @Override
    public int updateRuleAction(RuleAction ruleAction)
    {
        return ruleActionMapper.updateRuleAction(ruleAction);
    }

    /**
     * 批量删除规则动作
     *
     * @param ids 需要删除的规则动作主键
     * @return 结果
     */
    @Override
    public int deleteRuleActionByIds(Long[] ids)
    {
        return ruleActionMapper.deleteRuleActionByIds(ids);
    }

    /**
     * 删除规则动作信息
     *
     * @param id 规则动作主键
     * @return 结果
     */
    @Override
    public int deleteRuleActionById(Long id)
    {
        return ruleActionMapper.deleteRuleActionById(id);
    }
}
